#pragma once

#include <Runtime/Core/Core.h>
#include <Runtime/Containers/Singleton.h>
#include <memory>
#include <Runtime/Graphics/Buffer/GraphicsBuffer.h>

using namespace DirectX;

struct LightCBData {
	XMFLOAT3 ambientColor;
	float ambientIntensity;

	XMFLOAT3 lightColor;
	float lightIntensity;
	XMFLOAT3 lightPosition;
};

class Light {
public:
	Light();
	~Light() = default;

	LightCBData mData;
	std::shared_ptr<GraphicsBuffer> mBuffer;
};

class LightManager : public Singleton<LightManager> {
public:
	LightManager() {
		if (mLight == nullptr) {
			mLight = std::make_shared<Light>();
		}
	}
	~LightManager() = default;


	std::shared_ptr<Light>& GetLight() { return mLight; }
private:
	std::shared_ptr<Light> mLight;
};